export default {
  methods: {
    async getList() {
      let json = await this.$api.internetBar.list(this.params);
      json = json || {}
      this.list = json.data || [];
      this.total_count = json.total_count || 0
    },
    handleDateChange(date) {
      date = date || []
      this.params.begin = date[0]
      this.params.end = date[1]
    },
    handleReset() {
      this.params.query = ''
      this.params.word = ''
      this.params.addr = ''
      this.date = []
      this.params.begin = ''
      this.params.end = ''
      this.getList()
    },
    handleSizeChange(size) {
      this.params.limit = size
      this.currentPage = 1
      this.params.offset = (this.currentPage - 1) * size
      this.getList()
    },
    handleCurrentChange(current) {
      this.params.offset = (current - 1) * this.params.limit
      this.getList()
    }
  },
}